package com.sky.mapper.admin;

import com.sky.annotation.AutoFill;
import com.sky.dto.CategoryDTO;
import com.sky.enumeration.OperationType;
import com.sky.pojo.Category;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {

    @AutoFill(value = OperationType.INSERT)
    void addType(Category category);

    List<Category> findByPage(String name, Integer type);

    void deleteById(Integer id);

    @AutoFill(value = OperationType.UPDATE)
    void update(Category category);

    @AutoFill(value = OperationType.UPDATE)
    void forbidden(Integer id);

    List<Category> findByType(Integer type);
}
